## YOLO in Raspberry Pi 3 
### OpenCV, Ninja-build, NNPACK Darknet
-----
### Run

#### Darknet - NNPACK
```
git clone https://github.com/digitalbrain79/darknet-nnpack.git

cd darknet-nnpack

wget -c https://pjreddie.com/media/files/yolov3-tiny.weights

wget -c https://pjreddie.com/media/files/yolov2-tiny.weights
```
```
docker run --rm --name Raspbian \
--net=host \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-ix \
-v $HOME/.Xauthority:/root/.Xauthority \
--mount type=bind,src=$PWD,dst=/root \
--workdir=/root \
-ti izone/yolo:armhf-opencv3 bash
```
```
sed -i '/OPENCV=/s/0/1/' Makefile # OpenCV yes
sed -i '/OPENCV=/s/1/0/' Makefile # OpenCV no

make
```
```
# YOLOv2-tiny
./darknet detector test cfg/coco.data cfg/yolov2-tiny.cfg yolov2-tiny.weights data/person.jpg

# YOLOv3-tiny
./darknet detector test cfg/coco.data cfg/yolov3-tiny.cfg yolov3-tiny.weights data/person.jpg
```

-----
### Build
```
docker build -t izone/yolo:armhf-opencv .
```

